const chokidar = require('chokidar');
const options = require("../../webpack.config");
const Compiler = require("../Compiler");
class DevServer{
  constructor(){
    this.options = options;
    this.run();
  }

  run(){
    chokidar.watch([options.devServer.contentBase]).on('all',(event,path)=>{
      new Compiler(options).run();
    })
  }
}

new DevServer()